package com.bee.剑指offer;

/**
 * @version 1.0.0
 * @Author yong.Mr
 * @data 2019-8-9
 */
public class 替换空格 {

    /**
     * 代码中的类名、方法名、参数名已经指定，请勿修改，直接返回方法规定的值即可
     *
     * @param s string字符串
     * @return string字符串
     */
    public static String replaceSpace(String s) {
        String str = "sdadsa";
        s = s.trim();
        s = s.replaceAll(" ", "%20");
        return s;
    }

    public static void main(String[] args) {
        String str = "We Are Happy";
        System.out.println(replaceSpace(str));
    }
}
